#include <QString>

#include "AnSysCallback.h"
#include "AnGlobal.h"

void AnSysCallback::response(QJsonObject an_resp)
{
    QString resp_name = an_resp.value(NAME).toString();
    if (resp_name == "connect_close") {
        emit connect_close();
    } else if (resp_name == "connect_accident") {
        emit connect_accident();
        emit connect_close();
    } else if (resp_name == "connect_build") {
        emit connect_build();
    }
}
